package demo.view;

import java.awt.Component;
import java.awt.FlowLayout;

import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;

public class ReaderPanel extends JPanel{
	private JTextField readerId;// 读者id的文本框
	private JTextField readerPassword;// 读者密码的文本框
	private JTextField readerName;// 读者姓名的文本框
	private JTextField readerSex;// 读者性别的文本框
	private JTextField readerBirth;// 读者生日的文本框
	private JTextField readerPro;// 读者专业的文本框
	private JTextField readerGrade;// 读者年级的文本框
	private JTextField readerTel;// 读者电话的文本框
	private JTextField readerEmail;// 读者邮箱的文本框
	private JButton btnSubmit;// 用于提交的按钮，显示文本按需设置

	/**
	 * Create the panel.
	 */
	public ReaderPanel() {
		setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

		JPanel contentPanel = new JPanel();
		contentPanel.setAlignmentY(Component.BOTTOM_ALIGNMENT);
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		add(contentPanel);
		contentPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));

		Box verticalBox = Box.createVerticalBox();
		contentPanel.add(verticalBox);

		JLabel lblNewLabel = new JLabel("学号：");
		verticalBox.add(lblNewLabel);

		Component verticalStrut = Box.createVerticalStrut(15);
		verticalBox.add(verticalStrut);

		JLabel lblNewLabel_1 = new JLabel("密码：");
		verticalBox.add(lblNewLabel_1);

		Component verticalStrut_1 = Box.createVerticalStrut(15);
		verticalBox.add(verticalStrut_1);

		JLabel lblNewLabel_2 = new JLabel("姓名：");
		verticalBox.add(lblNewLabel_2);

		Component verticalStrut_2 = Box.createVerticalStrut(15);
		verticalBox.add(verticalStrut_2);

		JLabel lblNewLabel_3 = new JLabel("性别：");
		verticalBox.add(lblNewLabel_3);
		
		Component verticalStrut_3 = Box.createVerticalStrut(15);
		verticalBox.add(verticalStrut_3);

		JLabel lblNewLabel_4 = new JLabel("生日：");
		verticalBox.add(lblNewLabel_4);
		
		Component verticalStrut_4 = Box.createVerticalStrut(15);
		verticalBox.add(verticalStrut_4);

		JLabel lblNewLabel_5 = new JLabel("专业：");
		verticalBox.add(lblNewLabel_5);
		
		Component verticalStrut_5 = Box.createVerticalStrut(15);
		verticalBox.add(verticalStrut_5);

		JLabel lblNewLabel_6 = new JLabel("年级：");
		verticalBox.add(lblNewLabel_6);
		
		Component verticalStrut_6 = Box.createVerticalStrut(15);
		verticalBox.add(verticalStrut_6);

		JLabel lblNewLabel_7 = new JLabel("电话：");
		verticalBox.add(lblNewLabel_7);
		
		Component verticalStrut_7 = Box.createVerticalStrut(15);
		verticalBox.add(verticalStrut_7);

		JLabel lblNewLabel_8 = new JLabel("邮箱：");
		verticalBox.add(lblNewLabel_8);
		
		

		Box verticalBox_1 = Box.createVerticalBox();
		contentPanel.add(verticalBox_1);

		readerId = new JTextField();
		verticalBox_1.add(readerId);
		readerId.setColumns(10);

		Component verticalStrut_8 = Box.createVerticalStrut(10);
		verticalBox_1.add(verticalStrut_8);

		readerPassword = new JTextField();
		verticalBox_1.add(readerPassword);
		readerPassword.setColumns(10);		

		
		Component verticalStrut_9 = Box.createVerticalStrut(10);
		verticalBox_1.add(verticalStrut_9);
		
        readerName = new JTextField();
		verticalBox_1.add(readerName);
		readerName.setColumns(10);

		Component verticalStrut_10 = Box.createVerticalStrut(10);
		verticalBox_1.add(verticalStrut_10);

		readerSex= new JTextField();
		verticalBox_1.add(readerSex);
		readerSex.setColumns(10);
		
		Component verticalStrut_11 = Box.createVerticalStrut(10);
		verticalBox_1.add(verticalStrut_11);

		readerBirth= new JTextField();
		verticalBox_1.add(readerBirth);
		readerBirth.setColumns(10);
		
		Component verticalStrut_12 = Box.createVerticalStrut(10);
		verticalBox_1.add(verticalStrut_12);

		readerPro= new JTextField();
		verticalBox_1.add(readerPro);
		readerPro.setColumns(10);
		
		Component verticalStrut_13 = Box.createVerticalStrut(10);
		verticalBox_1.add(verticalStrut_13);

		readerGrade= new JTextField();
		verticalBox_1.add(readerGrade);
		readerGrade.setColumns(10);
		
		Component verticalStrut_14 = Box.createVerticalStrut(10);
		verticalBox_1.add(verticalStrut_14);

		readerTel= new JTextField();
		verticalBox_1.add(readerTel);
		readerTel.setColumns(10);
		
		Component verticalStrut_15 = Box.createVerticalStrut(10);
		verticalBox_1.add(verticalStrut_15);

		readerEmail= new JTextField();
		verticalBox_1.add(readerEmail);
		readerEmail.setColumns(10);
		
		
		
		
		
				JPanel buttonPanel = new JPanel();
				buttonPanel.setAlignmentY(Component.BOTTOM_ALIGNMENT);
				add(buttonPanel);
				
						btnSubmit = new JButton("插入记录");
						buttonPanel.add(btnSubmit);
	}

	public JTextField getReaderId() {
		return readerId;
	}

	public JTextField getReaderPassword() {
		return readerPassword;
	}

	public JTextField getReaderName() {
		return readerName;
	}

	public JTextField getReaderSex() {
		return readerSex;
	}
	
	public JTextField getReaderBirth() {
		return readerBirth;
	}
	
	public JTextField getReaderPro() {
		return readerPro;
	}
	
	public JTextField getReaderGrade() {
		return readerGrade;
	}
	
	public JTextField getReaderTel() {
		return readerTel;
	}
	
	public JTextField getReaderEmail() {
		return readerEmail;
	}

	public JButton getBtnSubmit() {
		return btnSubmit;
	}


}
